home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / UrbCedWWW.lha / urbcedwww / rexx / DelKV.ucwx < prev    next >
Encoding:
Text File  |  1998-09-30  |  2.2 KB  |  110 lines

  1. /**************************************************************************/
  2. /*                              DelKV.ucwx                                */
  3. /*                                                                        */
  4. /*                    Copyright ©1998 by Dick Whiting                     */
  5. /*                                                                        */
  6. /*------------------------------------------------------------------------*/
  7. /*                        Delete a key=value pair                         */
  8. /*      See the UrbCedWWW Readme for a more complete description.         */
  9. /**************************************************************************/
  10. /*
  11. $VER: 1.0 Copyright ©1998 by Dick Whiting
  12. */
  13.  
  14. options results
  15. Address CYGNUSED
  16.  
  17. startline=-1
  18. endline=-1
  19. startcol=-1
  20. endcol=-1
  21.  
  22. 'CEDTOFRONT'
  23.  
  24. starttag=1
  25.  
  26. 'STATUS NUMLINES'
  27. numlines=result
  28.  
  29. 'STATUS CURSORCOLUMN'
  30. startcol=result+1
  31.  
  32. 'GETCHAR'
  33. char=result
  34.  
  35. do while (char~=' ' & startcol>1)
  36.    'LEFT'
  37.    'GETCHAR'
  38.    char=result
  39.    'STATUS CURSORCOLUMN'
  40.    colptr=result
  41.    'STATUS CURSORLINE'
  42.    currline=result
  43.    if (colptr=0 & currline=0) then do
  44.       'OKAY1' 'Unable to find beginning value'
  45.       exit
  46.    end
  47.    startcol=colptr+1
  48. end
  49.  
  50. 'STATUS CURSORLINE'
  51. startline=result+1
  52.  
  53. 'RIGHT'
  54. 'GETCHAR'
  55. char=result
  56.  
  57. do while (char~=' ' & char~='>')
  58.    'RIGHT'
  59.    'GETCHAR'
  60.    char=result
  61.    'STATUS CURSORCOLUMN'
  62.    colptr=result+1
  63.    'STATUS CURSORLINE'
  64.    currline=result
  65.    'STATUS LINEMEMORYLENGTH'
  66.    linelen=result
  67.    if (colptr>=linelen & currline>=numlines) then do
  68.       'OKAY1' 'At end-of-file'
  69.       exit
  70.    end
  71.  
  72.    if char='"' then do 
  73.       do until char='"'
  74.          'RIGHT'
  75.          'GETCHAR'
  76.          char=result
  77.          'STATUS CURSORCOLUMN'
  78.          colptr=result+1
  79.          'STATUS CURSORLINE'
  80.          currline=result
  81.          'STATUS LINEMEMORYLENGTH'
  82.          linelen=result
  83.          if (colptr>=linelen & currline>=numlines) then do
  84.             'OKAY1' 'At end-of-file'
  85.             exit
  86.          end
  87.       end
  88.    end
  89. end
  90.  
  91. 'STATUS CURSORCOLUMN'
  92. endcol=result+1
  93.  
  94. 'STATUS CURSORLINE'
  95. endline=result+1
  96.  
  97. if ((startline>-1) & (endline>-1)) then do
  98.    'LL' startline startcol
  99.    'MARK'
  100.    on=result
  101.    if ~on then 'MARK'
  102.    'LL' endline endcol
  103. end
  104.  
  105. 'CUT'
  106.  
  107. exit
  108.  
  109.  
  110.